<?php
/*
 * logged
 * leader
 * member
 * admin
 */
function smarty_function_security_protoweb($params,&$smarty) {
  $user = User::logged();

  if (($params["leader"]) && ($user->is_leader_of($params["project_id"])))
    return $params["leader"];

  //if (($params["admin"]) && ($user->id == 1))
  //  return $params["admin"];

  if ($params["alt"])
    return $params["alt"];
}
